home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / howtod2r / frmsited.frm (.txt) < prev    next >
Visual Basic Form  |  1999-01-17  |  10KB  |  323 lines

  1. VERSION 5.00
  2. Begin VB.Form frmSiteDefinition 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Site Definition"
  5.    ClientHeight    =   6510
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   8910
  9.    Icon            =   "frmSiteDefinition.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   6510
  15.    ScaleWidth      =   8910
  16.    Begin VB.Frame fraRootDefinitions 
  17.       Caption         =   "Root Definition"
  18.       Height          =   1215
  19.       Left            =   5400
  20.       TabIndex        =   11
  21.       Top             =   5040
  22.       Width           =   3375
  23.       Begin VB.TextBox txtRoot 
  24.          Enabled         =   0   'False
  25.          Height          =   285
  26.          Left            =   1320
  27.          TabIndex        =   14
  28.          Top             =   360
  29.          Width           =   1815
  30.       End
  31.       Begin VB.OptionButton optDivined 
  32.          Caption         =   "Divined"
  33.          Height          =   375
  34.          Left            =   240
  35.          TabIndex        =   13
  36.          Top             =   720
  37.          Value           =   -1  'True
  38.          Width           =   975
  39.       End
  40.       Begin VB.OptionButton optDefine 
  41.          Caption         =   "Supplied"
  42.          Height          =   255
  43.          Left            =   240
  44.          TabIndex        =   12
  45.          Top             =   360
  46.          Width           =   975
  47.       End
  48.    End
  49.    Begin VB.Frame fraOperations 
  50.       Caption         =   "Operations"
  51.       Height          =   1215
  52.       Left            =   240
  53.       TabIndex        =   5
  54.       Top             =   5040
  55.       Width           =   4575
  56.       Begin VB.CommandButton cmdMapIt 
  57.          Caption         =   "Map it!"
  58.          Height          =   615
  59.          Left            =   3120
  60.          TabIndex        =   10
  61.          Top             =   360
  62.          Width           =   1215
  63.       End
  64.       Begin VB.CommandButton cmdBuildList 
  65.          Caption         =   "Build File List"
  66.          Height          =   615
  67.          Left            =   1680
  68.          TabIndex        =   7
  69.          Top             =   360
  70.          Width           =   1215
  71.       End
  72.       Begin VB.CommandButton cmdChoose 
  73.          Caption         =   "Choose Directory"
  74.          Height          =   615
  75.          Left            =   240
  76.          TabIndex        =   6
  77.          Top             =   360
  78.          Width           =   1215
  79.       End
  80.    End
  81.    Begin VB.Frame fraDirDefinition 
  82.       Caption         =   "Directory Definition"
  83.       Height          =   4095
  84.       Left            =   240
  85.       TabIndex        =   0
  86.       Top             =   720
  87.       Width           =   8535
  88.       Begin VB.CommandButton cmdMasks 
  89.          Caption         =   "Define Masks"
  90.          Height          =   255
  91.          Left            =   5280
  92.          TabIndex        =   17
  93.          Top             =   960
  94.          Width           =   1335
  95.       End
  96.       Begin VB.ListBox lstFiles 
  97.          Height          =   2010
  98.          Left            =   240
  99.          Sorted          =   -1  'True
  100.          TabIndex        =   8
  101.          Top             =   1800
  102.          Width           =   8055
  103.       End
  104.       Begin VB.Label lbllFiles 
  105.          Caption         =   "Files:"
  106.          Height          =   255
  107.          Left            =   120
  108.          TabIndex        =   9
  109.          Top             =   1440
  110.          Width           =   975
  111.       End
  112.       Begin VB.Label lblFileMasks 
  113.          Height          =   375
  114.          Left            =   1560
  115.          TabIndex        =   4
  116.          Top             =   960
  117.          Width           =   5415
  118.       End
  119.       Begin VB.Label lbllFileMasks 
  120.          Caption         =   "File Masks:"
  121.          Height          =   255
  122.          Left            =   120
  123.          TabIndex        =   3
  124.          Top             =   960
  125.          Width           =   1215
  126.       End
  127.       Begin VB.Label lblDirectory 
  128.          Height          =   375
  129.          Left            =   1560
  130.          TabIndex        =   2
  131.          Top             =   360
  132.          Width           =   6735
  133.       End
  134.       Begin VB.Label lbllMainDirectory 
  135.          Caption         =   "Main Directory:"
  136.          Height          =   255
  137.          Left            =   120
  138.          TabIndex        =   1
  139.          Top             =   360
  140.          Width           =   1215
  141.       End
  142.    End
  143.    Begin VB.Label lblSiteName 
  144.       Height          =   255
  145.       Left            =   1440
  146.       TabIndex        =   16
  147.       Top             =   240
  148.       Width           =   5055
  149.    End
  150.    Begin VB.Label lbllSite 
  151.       Caption         =   "Site Name:"
  152.       Height          =   255
  153.       Left            =   360
  154.       TabIndex        =   15
  155.       Top             =   240
  156.       Width           =   855
  157.    End
  158. Attribute VB_Name = "frmSiteDefinition"
  159. Attribute VB_GlobalNameSpace = False
  160. Attribute VB_Creatable = False
  161. Attribute VB_PredeclaredId = True
  162. Attribute VB_Exposed = False
  163. Option Explicit
  164. 'frmSiteDefinition.frm
  165. '--------------------------------------------------------------------------
  166. '<Purpose>
  167. '<Revision>
  168. '       $Revision: $
  169. '<Mod Log>
  170. '       $Log: $
  171. '--------------------------------------------------------------------------
  172. Public mSiteID As String
  173. Public mWasLoaded As Boolean
  174. Private Sub cmdBuildList_Click()
  175. '--------------------------------------------------------------------------
  176. '<Purpose>
  177. '<Syntax>
  178. '<Assumptions>
  179. '<Returns>
  180. '<Author>
  181. '   HBW
  182. '--------------------------------------------------------------------------
  183. Dim i As Integer
  184. Dim strName As String
  185.     strName = InputBox("Site Name?", "Define site")
  186.     lblSiteName = strName
  187.     Me.Caption = Me.Caption & " - " & strName
  188.     gSites(mSiteID).SiteName = strName
  189.     frmMain.sbMain.SimpleText = "Finding files...please wait."
  190.     Screen.MousePointer = vbHourglass
  191.     gSites(mSiteID).FileCount = 0
  192.     lstFiles.Clear
  193.     For i = 1 To gSites(mSiteID).FilterCount
  194.         Call FindFiles(False, gSites(mSiteID).MainDirectory, gSites(mSiteID).FilterEntry(i), mSiteID)
  195.     Next
  196.     For i = 1 To gSites(mSiteID).FileCount
  197.         lstFiles.AddItem gSites(mSiteID).FileEntry(i)
  198.     Next
  199.     Screen.MousePointer = vbNormal
  200.     frmMain.sbMain.SimpleText = ""
  201. End Sub
  202. '--------------------------------------------------------------------------
  203. '<Purpose>
  204. '<Syntax>
  205. '<Assumptions>
  206. '<Returns>
  207. '<Author>
  208. '   HBW
  209. '--------------------------------------------------------------------------
  210. Private Sub cmdChoose_Click()
  211.     Load frmChooseDirectory
  212.     If Len(gSites(mSiteID).MainDirectory) > 0 Then
  213.         frmChooseDirectory.CurrentDirectory = gSites(mSiteID).MainDirectory
  214.         lblDirectory = gSites(mSiteID).MainDirectory
  215.     End If
  216.     frmChooseDirectory.Show vbModal
  217.     If gSites(mSiteID).MainDirectory <> frmChooseDirectory.CurrentDirectory Then
  218.        gSites(mSiteID).MainDirectory = frmChooseDirectory.CurrentDirectory
  219.         lblDirectory = gSites(mSiteID).MainDirectory
  220.     End If
  221.     Unload frmChooseDirectory
  222. End Sub
  223. '--------------------------------------------------------------------------
  224. '<Purpose>
  225. '<Syntax>
  226. '<Assumptions>
  227. '<Returns>
  228. '<Author>
  229. '   HBW
  230. '--------------------------------------------------------------------------
  231. Private Sub cmdMapIt_Click()
  232.     If optDefine.Value = True And Len(txtRoot) = 0 Then
  233.         MsgBox "Missing supplied value for root."
  234.         txtRoot.SetFocus
  235.         Exit Sub
  236.     End If
  237.     Screen.MousePointer = vbHourglass
  238.     Call MapMe(mSiteID)
  239.     Screen.MousePointer = vbNormal
  240.     frmMain.sbMain.SimpleText = ""
  241. End Sub
  242. Private Sub cmdMasks_Click()
  243. Dim frm As New frmPickFilter
  244. Dim i As Integer
  245. Dim st As Site
  246.     For i = 1 To gSites(mSiteID).FilterCount
  247.         frm.lstFilters.AddItem gSites(mSiteID).FilterEntry(i)
  248.     Next
  249.     Set frm.mSite = gSites(mSiteID)
  250.     frm.Show vbModal
  251.     Set st = gSites(mSiteID)
  252.     lblFileMasks = ""
  253.     For i = 1 To st.FilterCount
  254.         lblFileMasks = lblFileMasks & st.FilterEntry(i) & "  "
  255.     Next
  256. End Sub
  257. '--------------------------------------------------------------------------
  258. '<Purpose>
  259. '<Syntax>
  260. '<Assumptions>
  261. '<Returns>
  262. '<Author>
  263. '   HBW
  264. '-------------------------